﻿using UnityEngine;
using System.Collections;

/// <summary>
/// 配合SmoothPositionSync使用
/// </summary>
public class PositionBroadcaster : SparkBehaviour
{

    public float broadcastInterval = 0.1f;
    public bool startBroadcasting = true;

    void Start()
    {
        if (startBroadcasting)
        {
            ChangeSyncFrequency(broadcastInterval);
        }
    }

    public void ChangeSyncFrequency(float t)
    {
        CancelInvoke("broadcastPos");
        InvokeRepeating("broadcastPos", 0, t);
    }

    void broadcastPos()
    {
       
    }

}
